﻿namespace Note.Model
{
    public class NoteDetailModel
    {
        public string Type { get; set; }

        public string Title { get; set; }

        public string Name
        {
            get
            {
                return Title;
            }
        }
        public string Path
        {
            get
            {
                return string.Format(@"{0}\{1}\{2}", ConfigModel.ExtractPath, Type, Name);
            }
        }

        public string Content
        {
            get
            {
                return this.ReadFile(Path);
            }

            set
            {
                this.WriteFile(Path, value);
            }
        }
    }
}
